using System;
using System.Collections.Generic;
using System.Text;
using FireStarter.Base;
using FireStarterModeller.BO;

namespace FireStarter.CodeGeneration
{
    public class UiProjectTemplateLoader: TemplateLoader
    {
        public string GetUiManager(string namespaceName, string boReference)
        {
            string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.UI_UIManager_cs;
            }
            SetNamespaceTag(ref fileContents, namespaceName);
            SetBoReferenceTag(ref fileContents,boReference);
            return fileContents;
        }

        public string GetIControlFactory(string name, IModelSolution solution)
        {
            string fileName = "";
            string fileContents;
            if (!loadFromFile(fileName, out fileContents))
            {
                fileContents = Templates.UI_Base_IControlFactory;
            }

            return GetGeneratedTemplate(fileContents, solution);
        }
    }
}
